<?php
include('wp-blog-header.php');
function check_api_key($api_key){
  $api_pod = new Pod('api');
  $api_pod->page = 1;
  $api_pod->search = 1;
  $api_pod->findRecords('id DESC', -1, "t.api_key ='$api_key'");
  $is_api_unique = $api_pod->getTotalRows();
  if($is_api_unique > 0)
  {
	check_api_key(uniqid());  
  }
  else
  {
	return $api_key;
  }
}
  
$unique_api_key = check_api_key(uniqid());

echo $unique_api_key;
?>